# 定义字典
dic = {'name':'字典','age':'15','sex':'男'}

# 字典输出
print(dic)
print(len(dic))

# 字典的合并
dic2 = {'weight':75,'height':150,'age':20}
dic.update(dic2)  # 如果两个字典中有相同的key(age),则数据会覆盖
print(dic)

# 字典的清除
dic.clear()
print(dic)

# 字典的循环遍历
test_dic = {'qq':'10086','age':'18','num':'99'}
for k in test_dic :
    print('%s-%s' %(k,test_dic[k]))

#实际应用场景
car_list = [
    {"test1":"测试1","name":"名字1"},
    {"test2":"测试2","name":"名字2"}
]

for x in car_list :
    print(x)